﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
    xmlns:dataformtoolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit" 
    xmlns:local="clr-namespace:Coproject.Controls"
    mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="CoreStyles.xaml"/>
        <ResourceDictionary Source="ToolkitStyles.xaml"/>
        <ResourceDictionary Source="Styles.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="LeftBorderStyle" BasedOn="{StaticResource LinksBorderStyle}" TargetType="Border">
        <Setter Property="Margin" Value="10,135,25,0"/>
    </Style>

    <Style x:Key="ApplicationHeaderStyle" TargetType="StackPanel">
        <Setter Property="Orientation" Value="Horizontal" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="VerticalAlignment" Value="Top" />
    </Style>

    <Style x:Key="MainContentStyle" TargetType="ContentControl">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="80,220,0,0"/>
        <Setter Property="Padding" Value="0 0 15 15"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>

    <Style x:Key="ApplicationTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource ApplicationNameStyle}">
        <Setter Property="Margin" Value="90,55,0,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>

    <Style x:Key="NavigationMenuItemStyle" TargetType="ListBoxItem">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavigationBorderBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource NavigationForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource NavigationFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="78"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="8,4,18,4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid x:Name="grid" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="mouseOverContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.4" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Selected"/>
                                <VisualState x:Name="SelectedUnfocused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <ContentPresenter x:Name="contentPresenter" 
                                              ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" />
                        <ContentPresenter x:Name="mouseOverContentPresenter" Visibility="Collapsed"
                                              ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NavigationMenuStyle" TargetType="ListBox">
        <Setter Property="HorizontalAlignment" Value="Left" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="Margin" Value="80,130,0,0" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="ItemContainerStyle" Value="{StaticResource NavigationMenuItemStyle}" />
    </Style>

    <Style x:Key="CurrentPageTitleStyle" BasedOn="{StaticResource HeaderTextStyle}" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="NoWrap"/>
        <Setter Property="Margin" Value="80,180,0,0"/>
    </Style>

    <Style x:Key="FilterPanelStyle" TargetType="Border">
        <Setter Property="Background" Value="{StaticResource GrayBrush8}" />
        <Setter Property="CornerRadius" Value="5" />
        <Setter Property="Padding" Value="5" />
    </Style>

    <Style x:Key="FilterTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource DefaultTextBoxStyle}">
        <Setter Property="Margin" Value="0,0,5,0" />
    </Style>

    <Style x:Key="StatusTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource DefaultTextBlockStyle}">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
    </Style>

    <Style x:Key="ListsScrollViewerStyle" TargetType="ScrollViewer" BasedOn="{StaticResource DefaultScrollViewerStyle}">
        <Setter Property="Margin" Value="0,5,0,0" />
        <Setter Property="VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="BorderThickness" Value="0" />
    </Style>

    <Style x:Key="HiddenButtonStyle" TargetType="ButtonBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ButtonBase">
                    <Grid/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>



<!-- JSR ADDEDD -->
    <!-- DataForm Style-->
    <Style TargetType="dataformtoolkit:DataForm" x:Key="DefaultDataFormStyle">
        <Setter Property="AutoCommit" Value="True"/>
        <Setter Property="AutoGenerateFields" Value="True"/>
        <Setter Property="Background" Value="{StaticResource WhiteBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="BorderBrush" Value="{StaticResource ThumbBrush}"/>
        <Setter Property="DescriptionViewerPosition" Value="Auto"/>
        <Setter Property="LabelPosition" Value="Auto"/>
        <Setter Property="HeaderVisibility" Value="Visible"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="dataformtoolkit:DataForm">
                    <Grid dataformtoolkit:DataField.IsFieldGroup="True">
                        <Grid.Resources>
                            <Style x:Key="ButtonGeneric" TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource TransparentBlackBrush}"/>
                                <Setter Property="Foreground" Value="{StaticResource BlackColorBrush}"/>
                                <Setter Property="BorderBrush" Value="{StaticResource WhiteColorBrush}"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="Padding" Value="1"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid>
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="{StaticResource WhiteColor}" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="OuterBtnBorder"/>
                                                                <ColorAnimation Duration="0" To="{StaticResource Gray10}" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="InnerBtnBorder"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="{StaticResource Gray10}" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="InnerBtnBorder"/>
                                                                <ColorAnimation Duration="0" To="{StaticResource Gray10}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="InnerBtnBorder"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="contentPresenter"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="OuterBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="3">
                                                    <Border x:Name="InnerBtnBorder" BorderBrush="{StaticResource TransparentWhiteBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource TransparentWhiteBrush}" CornerRadius="2">
                                                        <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" Height="Auto" VerticalAlignment="Center" Width="Auto"/>
                                                    </Border>
                                                </Border>
                                                <Border x:Name="FocusVisualElement" BorderBrush="{StaticResource HighlightBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="2" Margin="1" Opacity="0"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Key="CustomScrollViewerStyle" TargetType="ScrollViewer">
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="VerticalContentAlignment" Value="Top"/>
                                <Setter Property="BorderThickness" Value="0,1"/>
                                <Setter Property="BorderBrush" Value="{StaticResource GrayBrush2}"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ScrollViewer">
                                            <Grid>
                                                <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="0,-1" Opacity="0.2" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}">
                                                    <Border.OpacityMask>
                                                        <LinearGradientBrush EndPoint="1.07,0.5" StartPoint="-0.07,0.5">
                                                            <GradientStop Color="{StaticResource BlackColor}"/>
                                                            <GradientStop Color="{StaticResource BlackColor}" Offset="0.5"/>
                                                            <GradientStop Color="{StaticResource BlackColor}" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Border.OpacityMask>
                                                </Border>
                                                <Grid Background="{TemplateBinding Background}">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*"/>
                                                        <RowDefinition Height="Auto"/>
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*"/>
                                                        <ColumnDefinition Width="Auto"/>
                                                    </Grid.ColumnDefinitions>
                                                    <ScrollContentPresenter x:Name="ScrollContentPresenter" Cursor="{TemplateBinding Cursor}" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="{TemplateBinding Padding}"/>
                                                    <Rectangle Grid.Column="1" Fill="{StaticResource GrayBrush1}" Grid.Row="1"/>
                                                    <ScrollBar x:Name="VerticalScrollBar" Grid.Column="1" IsTabStop="False" Maximum="{TemplateBinding ScrollableHeight}" Margin="0,-1" Minimum="0" Orientation="Vertical" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{TemplateBinding VerticalOffset}" ViewportSize="{TemplateBinding ViewportHeight}" Width="18"/>
                                                    <ScrollBar x:Name="HorizontalScrollBar" Grid.Column="0" Height="18" IsTabStop="False" Maximum="{TemplateBinding ScrollableWidth}" Margin="-1,0,-1,-1" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{TemplateBinding HorizontalOffset}" ViewportSize="{TemplateBinding ViewportWidth}"/>
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisual"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ModeStates">
                                <VisualState x:Name="ReadOnly"/>
                                <VisualState x:Name="Empty">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="False"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentPresenter"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Edit">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsEnabled" Storyboard.TargetName="EditButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="false"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CommitButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CancelButton">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="Invalid"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommittedStates">
                                <VisualState x:Name="Committed"/>
                                <VisualState x:Name="Uncommitted">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.9" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ChangeIndicator"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ScopeStates">
                                <VisualState x:Name="Entity"/>
                                <VisualState x:Name="Collection"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="DataFormBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <Grid MinHeight="27" Visibility="{TemplateBinding HeaderVisibility}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition/>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="8"/>
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Orientation="Horizontal">
                                        <ContentControl x:Name="HeaderElement" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" Foreground="{TemplateBinding Foreground}" FontWeight="Bold" Margin="10,0,0,0" VerticalAlignment="Center"/>
                                        <TextBlock x:Name="ChangeIndicator" Foreground="{TemplateBinding Foreground}" FontWeight="Bold" Margin="3,-2,8,2" Opacity="0" Text="*" VerticalAlignment="Center"/>
                                    </StackPanel>
                                    <StackPanel Grid.Column="2" Margin="0,3,0,2" Orientation="Horizontal">
                                        <Button x:Name="FirstItemButton" Style="{StaticResource ButtonGeneric}">
                                            <Grid Height="9" Margin="6,5,5,5" Opacity="1" Width="8">
                                                <Grid.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.6,1" StartPoint="0.4,0">
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Grid.OpacityMask>
                                                <Grid.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" Opacity="1" ShadowDepth="0"/>
                                                </Grid.Effect>
                                                <Path Data="M1,0 L1,2 L0,1 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Right" Height="9" Margin="0" Opacity="0.85" Stretch="Fill" Width="5"/>
                                                <Rectangle Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Opacity="0.85" Width="2"/>
                                            </Grid>
                                        </Button>
                                        <Button x:Name="PreviousItemButton" Style="{StaticResource ButtonGeneric}">
                                            <Path Data="M1,0 L1,2 L0,1 Z" Fill="{TemplateBinding Foreground}" Height="9" Margin="6,5,8,5" Opacity="0.85" Stretch="Fill" Width="5">
                                                <Path.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" ShadowDepth="0"/>
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.6,1" StartPoint="0.4,0">
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                        <Button x:Name="NextItemButton" Style="{StaticResource ButtonGeneric}">
                                            <Path Data="M0,0 L1,1 L0,2 Z" Fill="{TemplateBinding Foreground}" Height="9" Margin="8,5,6,5" Opacity="0.85" Stretch="Fill" Width="5">
                                                <Path.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" ShadowDepth="0"/>
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.6,1" StartPoint="0.4,0">
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                        <Button x:Name="LastItemButton" Style="{StaticResource ButtonGeneric}">
                                            <Grid Height="9" Margin="6,5,5,5" Opacity="1" Width="8">
                                                <Grid.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.6,1" StartPoint="0.4,0">
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Grid.OpacityMask>
                                                <Grid.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" ShadowDepth="0"/>
                                                </Grid.Effect>
                                                <Path Data="M0,0 L1,1 L0,2 Z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Height="9" Opacity="0.85" Stretch="Fill" Width="5"/>
                                                <Rectangle Fill="{TemplateBinding Foreground}" HorizontalAlignment="Right" Opacity="0.85" Width="2"/>
                                            </Grid>
                                        </Button>
                                        <Border x:Name="ButtonSeparator" BorderBrush="{StaticResource TransparentLightestBrush}" BorderThickness="1,0,1,0" Background="{TemplateBinding BorderBrush}" Margin="2,4,2,4" Opacity="0.2" Width="3"/>
                                        <Button x:Name="EditButton" Style="{StaticResource ButtonGeneric}" ToolTipService.ToolTip="Edit">
                                            <Button.OpacityMask>
                                                <LinearGradientBrush EndPoint="0.57,0.76" StartPoint="0.42,0.01">
                                                    <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0"/>
                                                    <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="0.442"/>
                                                    <GradientStop Color="{StaticResource TransparentLightLightColor}" Offset="1"/>
                                                </LinearGradientBrush>
                                            </Button.OpacityMask>
                                            <Grid HorizontalAlignment="Center" Height="19" VerticalAlignment="Center" Width="19">
                                                <Canvas HorizontalAlignment="Stretch" Margin="2,2,0,0" VerticalAlignment="Stretch">
                                                    <Path Data="F1 M 2.53,9.96L 4.96,11.1L 6.08,13.50L 13.09,6.50L 9.6,3L 2.53,9.96 Z " Fill="{TemplateBinding Foreground}" Height="10.5" Canvas.Left="2.53" Stretch="Fill" Canvas.Top="3.01" Width="10.56">
                                                        <Path.OpacityMask>
                                                            <LinearGradientBrush EndPoint="0.76,0.77" StartPoint="0.21,0.18">
                                                                <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0"/>
                                                                <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0.106"/>
                                                                <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0.387"/>
                                                                <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0.703"/>
                                                                <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="1"/>
                                                            </LinearGradientBrush>
                                                        </Path.OpacityMask>
                                                    </Path>
                                                    <Path Data="M1.41,1.83 L0.71,2.54 L4.20,6.03 L4.91,5.33 z M3.24,0 L6.81,3.42 L3.5,6.74 L0,3.24 z" Fill="{TemplateBinding Foreground}" Height="6.74" Canvas.Left="7.47" Stretch="Fill" Canvas.Top="1.89" Width="6.81"/>
                                                    <Path Data="F1 M 13.77,4.22L 11.73,2.18C 11.12,1.78 10.46,2.15 10,2.5L 3.04,9.45C 2.65,9.86 2.53,10.47 2.53,10.73L 2.53,13.5L 5.32,13.5C 5.57,13.5 6.33,13.36 6.64,12.93L 13.54,6.03C 13.86,5.72 14.17,4.74 13.77,4.22 Z" Height="12.5" Canvas.Left="2.03" Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeLineJoin="Round" Canvas.Top="1.50" Width="12.43"/>
                                                    <Path Data="F1 M 2.033,11.71L 4.33,14L 2.62,14C 2.17,13.93 2.09,13.79 2,13.31L 2.03,11.71 Z" Fill="{TemplateBinding Foreground}" Height="2.29" Canvas.Left="2.58" Stretch="Fill" Canvas.Top="11.18" Width="2.33"/>
                                                </Canvas>
                                            </Grid>
                                        </Button>
                                        <Button x:Name="NewItemButton" Style="{StaticResource ButtonGeneric}" ToolTipService.ToolTip="Add">
                                            <Path Data="F1 M18.41,61.67 L19.56,60.52 L21.92,62.88 L24.22,60.57 L25.36,61.72 L23.06,64.03 L25.43,66.4 L24.22,67.60 L21.87,65.25 L19.56,67.56 L18.41,66.41 L20.73,64.08 L18.41,61.67 z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" Height="9" Margin="5" Opacity="0.85" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="9">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform/>
                                                        <SkewTransform/>
                                                        <RotateTransform Angle="45"/>
                                                        <TranslateTransform X="0.18" Y="-0.07"/>
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                                <Path.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" ShadowDepth="0"/>
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.35,0.5" StartPoint="-0.27,0.05">
                                                        <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource BlackColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                        <Button x:Name="DeleteItemButton" Style="{StaticResource ButtonGeneric}" ToolTipService.ToolTip="Delete">
                                            <Path Data="F1 M24.32,60.48 L25.60,61.76 L19.65,67.75 L18.37,66.46 z" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" Height="9" Margin="5,5,5,5" Opacity="0.85" RenderTransformOrigin="0.5,0.5" Stretch="Fill" VerticalAlignment="Center" Width="9">
                                                <Path.RenderTransform>
                                                    <TransformGroup>
                                                        <RotateTransform Angle="45"/>
                                                        <TranslateTransform X="0.06" Y="-0.01"/>
                                                    </TransformGroup>
                                                </Path.RenderTransform>
                                                <Path.Effect>
                                                    <DropShadowEffect BlurRadius="8" Color="{StaticResource WhiteColor}" Direction="100" ShadowDepth="0"/>
                                                </Path.Effect>
                                                <Path.OpacityMask>
                                                    <LinearGradientBrush EndPoint="0.74,0.66" StartPoint="-0.44,-0.11">
                                                        <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0"/>
                                                        <GradientStop Color="{StaticResource TransparentDarkDarkColor}" Offset="0.25"/>
                                                        <GradientStop Color="{StaticResource BlackColor}" Offset="1"/>
                                                    </LinearGradientBrush>
                                                </Path.OpacityMask>
                                            </Path>
                                        </Button>
                                    </StackPanel>
                                </Grid>
                                <ScrollViewer Background="{x:Null}" IsTabStop="False" Padding="{TemplateBinding Padding}" Grid.Row="1" Style="{StaticResource CustomScrollViewerStyle}" VerticalScrollBarVisibility="Auto">
                                    <ContentPresenter x:Name="ContentPresenter" Margin="12,12,6,12"/>
                                </ScrollViewer>
                                <dataInput:ValidationSummary x:Name="ValidationSummary" BorderThickness="0" MaxHeight="100" Grid.Row="2"/>
                                <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Row="3">
                                    <Button x:Name="CommitButton" Content="OK" HorizontalContentAlignment="Center" Margin="0,5,8,5" MinWidth="71" MinHeight="17" Visibility="Collapsed" VerticalContentAlignment="Center"/>
                                    <Button x:Name="CancelButton" Content="Cancel" HorizontalContentAlignment="Center" Margin="0,5,8,5" MinWidth="71" MinHeight="17" Visibility="Collapsed" VerticalContentAlignment="Center"/>
                                </StackPanel>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisual" Background="{StaticResource TransparentLightLightBrush}" IsHitTestVisible="False" Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="dataForm:DataForm" BasedOn="{StaticResource DefaultDataFormStyle}">
        <Setter Property="CommandButtonsVisibility" Value="None" />
        <Setter Property="CommitButtonStyle" Value="{StaticResource HiddenButtonStyle}" />
        <Setter Property="CancelButtonStyle" Value="{StaticResource HiddenButtonStyle}" />
    </Style>

    <Style TargetType="local:ImageButton" BasedOn="{StaticResource DefaultButtonStyle}">
        <Setter Property="Height" Value="32" />
    </Style>

    <Style TargetType="local:ExtendedTextBox" BasedOn="{StaticResource DefaultTextBoxStyle}" />


</ResourceDictionary>
